#include <net/if.h>
#include <string.h>

#define ETH_TSN0_IDX 5
#define ETH_TSN2_IDX 6

unsigned int if_nametoindex(const char *ifname){
    if (strcmp("/dev/eth_tsn0", ifname) == 0) {
        return ETH_TSN0_IDX;
    } else {
        return ETH_TSN2_IDX;
    }
    return 0;
}

